//
//  DLGlobalDefine.h
//  dielianw
//
//  Created by 刘威 on 16/8/13.
//  Copyright © 2016年 apple. All rights reserved.
//

#ifndef DLGlobalDefine_h
#define DLGlobalDefine_h

//手机型号
#define kDeviceModel [UIDevice currentDevice].model
#define APP_VERSION                         [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleShortVersionString"]

#define TabBarHeight                        49.0f
#define NaviBarHeight                       44.0f
#define HeightFor4InchScreen                568.0f
#define HeightFor3p5InchScreen              480.0f
#define HeightFor5p5InchScreen              736.0f
#define HeightFor4p7InchScreen              667.0f
#define ViewCtrlTopBarHeight                (NaviBarHeight + StatusBarHeight)

#define RGB(r, g, b)                        [UIColor colorWithRed:(r)/255.f green:(g)/255.f blue:(b)/255.f alpha:1.f]
#define RGBA(r, g, b, a)                    [UIColor colorWithRed:r/255.0 green:g/255.0 blue:b/255.0 alpha:a]

#define StatusBarHeight                     [UIApplication sharedApplication].statusBarFrame.size.height

#define SCREEN_WIDTH ([UIScreen mainScreen].bounds.size.width)
#define SCREEN_HEIGHT ([UIScreen mainScreen].bounds.size.height)
#define IOSVersion  [[[UIDevice currentDevice] systemVersion] floatValue]

#define WS(weakSelf)  __weak __typeof(&*self)weakSelf = self

#ifdef DEBUG
#define ZJLog(...) NSLog(__VA_ARGS__)

#else
#define ZJLog(...)

#endif
#define ZJFunc NSLog(@"%s",__func__)
#define MLColor(r,g,b) [UIColor colorWithRed:(r)/255.0 green:(g)/255.0 blue:(b)/255.0 alpha:1.0];

#define MLBgCocor MLColor(223, 223, 223)





#define VERSION_USERDEFAULT_KEY @"version_key"

//#define SHOW_SETTING_HEADER_IMAGE_GUIDE_KEY @"show_setting_header_image_key"
//#define SHOW_SETTING_CERTIFICATE_GUIDE_KEY @"show_setting_certificate_key"
//#define SHOW_CHECT_CERTIFICATE_GUIDE_KEY @"show_chect_certificate_key"
//#define SHOW_SETTING_RECHARGE_GUIDE_KEY @"show_setting_recharge_key"
//#define SHOW_CHECT_RECHARGE_GUIDE_KEY @"show_chect_recharge_key"


#define IMAGE_URL_TAIL(_str,_w,_h) [_str stringByAppendingString:[NSString stringWithFormat:@"?imageView2/1/w/%.0f/h/%.0f",_w * 2,_h * 2]]




//
//#define SHOPPINGCARCACHEKEY @"shopping_car_cache_key"
//#define SHOPPINGCARRLISTKEY @"shopping_car_request_key"
#define HOMEBOOLSHOWKEY @"home_bool_show_key"

#define HOMECATEGORYDATAKEY @"home_request_data_key"
#define HOMEMEDICINELISTKEY @"home_request_goods_list_data_key"
#define HOMECATEGORYKEY    @"home_request_category_key"
#define HOMEBANNERDATAKEY   @"home_request_banner_data_key"
#define PICURLPREKEY        @"pic_url_pre_key"
#define QNPICURLPREKEY        @"qn_pic_url_pre_key"
#define ACTIVITYPREKEY      @"activity_url_pre_key"
#define PRODUCTDETAILPREKEY @"product_detail_pre_key"
#define THIRDAUTHPREKEY     @"third_auth_page_pre_key"
#define LIANBINDCARDPREKEY  @"lian_bind_card_pre_key"
#define LIANPAYURLPREKEY    @"lian_pay_pre_key"
#define PROTOCALPREKEY      @"protocal_pre_key"
#define INVITEREGISTPREKEY  @"invite_regist_pre_key"


#define QINIUTOKEN          @"qi_niu_token_key"
#define USERLOGINKEY        @"user_login_key"
#define WEBPICKEY           @"web_pic_key"
//#define DEFAULTADDRESSKEY   @"default_address_key"
#define DEFAULTPOSITIONKEY  @"default_position_key"
#define SEARCHRECORDKEY     @"search_record_key"

#define NEWSTAGLISTKEY     @"news_tag_list_key"


#define Is5p5Inch                               [DLUtilityFunc is5Point5InchScreen]
#define Is4p7Inch                               [DLUtilityFunc is4Point7InchScreen]
#define Is4Inch                                 [DLUtilityFunc is4InchScreen]
#define Is3p5Inch                               [DLUtilityFunc is3Point5InchScreen]






#endif /* DLGlobalDefine_h */
